<?php
namespace app\scodetrace\validate;

class Batch extends \app\common\validate\Base {
	protected $rule=[
		'serial_number|批次编号' => 'regex:\w+',
		'name|批次可读名称'=>'length:1,30',
		'product_id|关联产品'=>'check_id:baseinfo/Product',
		'create_time|生产日期时间戳' => 'number',
		'out_time|出厂日期时间戳' => 'number',
		'area_id|销售地区'=>'check_id:baseinfo/Area',
		'expire_time|有效期'=>'number',
		'box_amount|每箱数量'=>'number',
		'boxs|合计箱数'=>'number',
		'issue_amount|发行箱数'=>'number',
		'query_amount|查询数量'=>'number',
		'area_code|防串货码'=>'length:10,36',
		'code_length|防伪码长度'=>'number',
		'code_type|防伪码类型'=>'number'
	];

	protected $create_require=['serial_number','name','product_id','create_time'];

}
?>